<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<table class="display" id="example">
	<thead>
		<tr>
			<th>选择</th>
			<th><strong>部门</strong></th>
			<th><strong>职务</strong></th>
			<th><strong>总数</strong></th>
			<th><strong>金额</strong></th>
		</tr>
	</thead>
	<tbody>
		<s:if test="#request.attendances == null || #request.attendances.size() <= 0">
			<tr class="gradeX"> <td colspan="5">暂无数据</td> </tr>
		</s:if>
		<s:else>
			<s:iterator value="#request.attendances" var="a" status="sta">
				<s:if test="#sta.even"> <tr class="gradeA"> </s:if> <s:else> <tr class="gradeC"> </s:else>
				<td><input type="checkbox" name="chk_salary_attendance" value="${a.id}" /></td>
				<td>${a.employeeinfoWork.organization.fullName}</td>
				<td>${a.employeeinfoWork.duty.dutyName}</td>
				<td>${a.total}</td>
				<td>${a.amount}</td>
				</tr>
			</s:iterator>
		</s:else>
	</tbody>
</table>
<p>
    <%@ include file="/WEB-INF/pages/common/main_orgtab_pager.jsp" %>
</p>

<script type="text/javascript">
    function pageTo(url){
        $.ajax(url, {
            type: "POST",
            data:{"organizationId":"${organizationId}", "year":"${year}", "month":"${month}"},
            dataType:"html",
            cache:false,
            success:function(a) {
                var obj = $("#windown-content");
                obj.html("");
                obj.append(a);
            },
            complete:function() {
            }
        });
    }
</script>